<?php // @version $Id: default_results.php 10381 2008-06-01 03:35:53Z pasamio $
defined('_JEXEC') or die('Restricted access');

if (count($this->results)) : 
	?>
	
	<div id="search-results">
	<h2><?php echo JText :: _('Search_result'); ?></h2>
		
		<?php 
		// Cosa ho cercato?
		if (!empty($this->searchword)) : ?>
		<div class="searchintro<?php echo $this->params->get('pageclass_sfx') ?>">
			<p>
				<?php echo JText::_('Search Keyword') ?> <strong><?php echo $this->escape($this->searchword) ?></strong>
				<?php echo $this->result ?>
			</p>
			<?php /* 
			<p>
				<a href="#form1" onclick="document.getElementById('search_searchword').focus();return false" onkeypress="document.getElementById('search_searchword').focus();return false" ><?php echo JText::_('Search_again') ?></a>
			</p>
			*/
			?>
		</div>
		<?php endif; ?>
	
		<?php $start = $this->pagination->limitstart + 1; ?>
		<?php foreach ($this->results as $result) : ?>

			<a href="<?php echo JRoute :: _($result->href) ?>" <?php echo ($result->browsernav == 1) ? 'target="_blank"' : ''; ?> >
				<?php if ($result->href) : ?>
				<h3><?php echo $this->escape($result->title); ?></h3>
				<?php endif; ?>
				
				<?php echo $result->text; ?>
			</a>

			<?php if ($result->section) : ?>
			<p class="sezione">
				<strong><?php echo JText::_('Section') ?></strong>
				<span class="small<?php echo $this->params->get('pageclass_sfx') ?>">
					<?php echo $this->escape($result->section); ?>
				</span>
			</p>
			<?php endif; ?>
			
			<?php 
			/*
			<span class="small<?php echo $this->params->get('pageclass_sfx') ?>">
				<?php echo $result->created; ?>
			</span>
			<?
			*/
			?>
		<br/>
		<?php endforeach; ?>

		<span class="pagination">
		<?php 
		// Paginazione 
		echo $this->pagination->getPagesLinks();
		?>
		</span>
		
		<div class="pagecounter">
		<?php 
		// Totale paginato
		echo $this->pagination->getPagesCounter();
		?>
		</div>

	</div>
<?php endif; ?>